<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>图片的显示和隐藏</title>
</head>
<body>
    <button id="pictureButton">隐藏</button>
    <br>
    <img src="img/brand_goods_2.jpg" alt="" id="picture">
    <script>
        var picture = document.getElementById('picture');
        var pictureButton = document.getElementById('pictureButton');
        
        pictureButton.onclick = function(){
            if(pictureButton.innerHTML === '隐藏'){
                picture.style.display = 'none';
                pictureButton.innerHTML = '显示';
            }else{
                picture.style.display = 'block';
                pictureButton.innerHTML = '隐藏';
            }
        }
    </script>
</body>
</html>